package com.eascs.pay.service;

import com.eascs.admin.o2o.loan.entity.O2oLoanapplyEntity;
import com.eascs.app.dao.PageResult;
import com.eascs.app.dao.SqlPageQuery;
import com.eascs.crm.common.entity.CustomerBasicInfoEntity;
import com.eascs.pay.entity.O2oPayEntity;

public interface O2oPayService {
	public PageResult<Object[]> findByPage(SqlPageQuery<Object[]> pageQuery);

	public O2oPayEntity findById(String id);

	public int updateEntityById(O2oPayEntity o2oPayEntity);

	public int deleteEntityById(O2oPayEntity o2oPayEntity);

	public int saveEntityById(O2oPayEntity o2oPayEntity);
	
	public boolean isHavePayFlow(O2oPayEntity o2oPayEntity );  //根据单号判断是否已经启动付款流程
	
	public boolean isHaveRUNPayFlow(O2oPayEntity o2oPayEntity );  //根据单号判断是否有付款流程在run过程中
	
	public int insertPayByEntity(O2oLoanapplyEntity o2oLoanapplyEntity,String payType,CustomerBasicInfoEntity basicEntity); //根据主单的编号生成付费流程的数据
	
	public int insertPayByEntityFx(O2oLoanapplyEntity o2oLoanapplyEntity,String payType,String payFkType,CustomerBasicInfoEntity basicEntity);

	public int updatePayByEntityFx(O2oLoanapplyEntity o2oLoanapplyEntity, String payType, String payFkType,CustomerBasicInfoEntity basicEntity);
	
}
